home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue30 / winmac / WINMAC.ZIP / readme.txt < prev    next >
Encoding:
Text File  |  1997-10-24  |  7.1 KB  |  139 lines

  1. WinMac32
  2.  
  3. Delphi Macro Component and DLL Set for Windows.
  4.  
  5. Copyright (c) 1994-1997 Ken Henderson.
  6.  
  7. Here's the 32-bit version of the Winmacro component set and macro engine that
  8. I originally released for Delphi 1.0.  Winmacro 1.x users will remember the
  9. TMacroSet component -- it implements a full-blown macro engine for Windows.
  10. The unit actually defines two other components, as well, TMacroKeyEdit (a
  11. desecendant of TEdit that allows entry of hot keys rather than text) and
  12. TMacroComboBox (a descendant of TComboBox that allows selection from a list
  13. of all available keys).
  14.  
  15. The component set provides much of the functionality of the Windows 3.x Recorder
  16. accessory, but exceeds it in many ways.  One of the most significant
  17. ways it does this is in its support for "code" macros -- macros that
  18. execute callback routines rather than playback keystrokes.  WinMac32 also
  19. allows nearly any key on the keyboard to be a hotkey -- it even allows
  20. mouse buttons to serve in that capacity.  And, best of all, it's all
  21. configurable from a simple component that insulates the developer from
  22. the complexities, pitfalls and near-death-experiences of the Windows
  23. journaling facility.
  24.  
  25. Another set of facilities in which you may have an interest is TMacroSet's SendKeys
  26. and AppActivate routines.  These work similarly to their Visual Basic counterparts.
  27. AppActivate makes a named window the current input focus, while SendKeys
  28. sends simulated keyboard input to the current input focus.  Note that, unlike
  29. the 16-bit version of Winmacro, the SendKeys routine in WinMac32 does not require
  30. that the macro engine be initialized before it can be used.  Also, the version
  31. of SendKeys found in WinMac32 supports a second parameter, "Wait" -- a boolean
  32. switch that determines whether the routine waits for the current input focus
  33. to process each simulated keystroke before sending it another.
  34.  
  35. I won't go into all the features -- the comments in the WinMac32 source code
  36. document them well.  There's also a wealth of info on the internals of the engine
  37. and components that you may find interesting.  If you have the registered version of
  38. the product, the source to the components are in WMacro.pas, the source to the macro 
  39. engine DLL is in WinMac32.pas.
  40.  
  41. You'll want to check out the included SRecordR (SuperRecorder) program for a demo
  42. of some of the things you can do with the macro facility.
  43.  
  44. I've written the engine in such a way as to make it language independent.  I'll
  45. be releasing the header files required to use it with C/C++ very soon.
  46.  
  47. Delphi 3 Installation
  48.  
  49. 1)  Unzip WinMac32.zip to the directory in which you'd like it to reside.
  50. Either add this directory to your path or copy WinMac32.dll to a directory
  51. that is on your path (e.g., \WINDOWS, \WINDOWS\SYSTEM32, etc.).  
  52.  
  53. **** NOTE: IF YOU NEGLECT TO COPY WINMAC32.DLL TO A DIRECTORY ON YOUR PATH, DELPHI WILL
  54. BE UNABLE TO LOAD ITS COMPONENT PALETTE THE NEXT TIME IT'S STARTED.  PUT WINMAC32.DLL
  55. ON THE PATH TO REMEDY THIS. ****
  56.  
  57. 2)  Select Install Component from the Delphi 3 Component menu.  Click the
  58. Browse button and locate the WMacro unit file that was created when you 
  59. unzipped WinMac32.  Once you return to the Install Component dialog, click OK
  60. to install the new components.
  61.  
  62. 3)  A new toolbar page called "Macros" is created that contains the three
  63. components comprising Delphi's interface to WinMac32.dll.
  64.  
  65. Special note for running SuperRecorder from under Delphi
  66.  
  67. You'll want to uncheck "Break on exception" in the Tools|Environment Options|Preferences
  68. dialog when running SuperRecorder under Delphi.  SuperRecorder enters a
  69. loop that iterates through all the *possible* macro indexes and obtains
  70. the name and hot key for each as it goes. Since macros can be deleted from
  71. the middle of the macro list -- the engine does not provide a method
  72. for returning the number of currently allocated macros -- it would be of
  73. very limited use.  Since there is no method of this type available,
  74. programs wishing to list all available macros must loop through the macro 
  75. list beginning with index 0 through the maximum number of macros.  Though 
  76. the maximum number of macros that you may allocate is limited only by available 
  77. memory, TMacroSet surfaces a property, MaxMacroNum, to assist in building macro 
  78. lists. Applications that use MaxMacroNum must handle exceptions generated by 
  79. attempting to access a macro that has been deactivated or by referring to an 
  80. index that has not yet had a macro assigned to it.  SuperRecorder demonstrates 
  81. how to do this.
  82.  
  83. Limits on use
  84.  
  85. This version of Winmacro has been released as a Shareware product. WinMac32
  86. comes in two flavors: the trial version and the full version.  The trial version will 
  87. only run when Delphi is also running.  If you attempt to run an application that uses 
  88. the demo version of TMacroSet or WinMac32 while Delphi 3 is not also running, the DLL 
  89. will refuse to load and your application will crash.
  90.  
  91. The full version, on the other hand, functions properly regardless of whether
  92. Delphi is running.  It also includes the complete source code to WinMac32, 
  93. as well as the 16-bit version of the product for use with Delphi 1.0.
  94.  
  95. You can obtain the full version by registering.  Since the trial version of the product 
  96. is for trying it out only, you can't include it with other applications. You must 
  97. register the product if you intend to use it.  You can register via mail or via 
  98. the Compuserve SWREG forum.  To register via the mail, send a check or money order 
  99. for $45 + $5 shipping/handling (in US dollars) to:
  100.  
  101. Ken Henderson
  102. P. O. Box 720844
  103. Norman, OK 73070
  104.  
  105. To register via Compuserve, GO SWREG and select Register Shareware from the menu.  
  106. The registration ID for WinMac32 is 16253.  Once I receive your registration notification, 
  107. I'll send you the complete WinMac32 package via CIS.
  108.  
  109. Once registered, you'll receive:
  110.  
  111. * the complete source code to WinMac32
  112. * the source code to SendKeys and AppActivate, which can be used independently of the 
  113.   macro engine
  114. * the full, non-crippled version of the product
  115. * the 16-bit version of the product for use with Delphi 1.0
  116. * notification of future updates and upgrades
  117.  
  118. Note that the source code to SendKeys and AppActivate also accompanies several of my books, 
  119. available from SAMS Publishing.  Currently, those books are:  Database Developer's Guide with 
  120. Delphi 2.0, Teach Yourself IntraBuilder in 21 Days, Teach Yourself C++Builder in 21 Days, 
  121. Client/Server Developer's Guide with Delphi 3 and Client/Server Developer's Guide with 
  122. C++Builder.
  123.  
  124. You can include the full version of WinMac32 with the applications you write without 
  125. royalties or other obigations to me. The only restriction on this is that you may not 
  126. include WinMac32 with a programming library of any type without my express written permission.
  127.  
  128. You can feel free to upload the trial version of WinMac32 to other on-line forums and 
  129. ftp sites so long as you do not modify it in any way (this includes adding or removing 
  130. files from its ZIP file archive).
  131.  
  132. I'd appreciate any feedback you might have.  Send any comments or
  133. suggestions to (CIS): 74763,2305 (Internet: khen@compuserve.com).
  134.  
  135. Ken Henderson
  136. October 24, 1997
  137.  
  138.  
  139.